<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Block Layout: Complex Positioning (Relative, Absolute, Fixed)</title>
        <link rel="author" title="Azul Layout" href="https://azul.rs/" />
        <meta name="flags" content="" />
        <meta name="assert" content="Block layout should correctly handle static, relative, absolute, and fixed positioning with z-index stacking." />
        <style type="text/css">
            * { margin: 0; padding: 0; }
            body {
                width: 800px;
                height: 600px;
                background: #000000;
                position: relative;
            }
            .container {
                position: relative;
                width: 100%;
                height: 100%;
                padding: 20px;
            }
            .static-box {
                width: 300px;
                height: 80px;
                background: #ff0000;
                margin: 20px;
            }
            .relative-box {
                position: relative;
                width: 350px;
                height: 80px;
                background: #00ff00;
                top: 30px;
                left: 50px;
                z-index: 10;
            }
            .absolute-box {
                position: absolute;
                width: 200px;
                height: 120px;
                background: #0000ff;
                top: 50px;
                right: 50px;
                z-index: 20;
            }
            .absolute-nested {
                position: absolute;
                width: 150px;
                height: 150px;
                background: #ffff00;
                bottom: -80px;
                right: -80px;
                z-index: 5;
            }
            .fixed-box {
                position: fixed;
                width: 180px;
                height: 180px;
                background: #ff00ff;
                bottom: 30px;
                right: 200px;
                z-index: 30;
            }
            .overlay {
                position: absolute;
                width: 250px;
                height: 250px;
                background: #00ffff;
                top: 350px;
                left: 100px;
                z-index: 15;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <div class="static-box"></div>
            <div class="relative-box">
                <div class="absolute-nested"></div>
            </div>
            <div class="static-box"></div>
            <div class="absolute-box"></div>
            <div class="overlay"></div>
            <div class="fixed-box"></div>
        </div>
    </body>
</html>